<!--
 * @Author: your name
 * @Date: 2020-11-26 15:24:38
 * @LastEditTime: 2020-11-26 16:37:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \FenXiaoShangChengAdmind:\工作资料\project_wjh\KunLunAdmin\web\KunLunAdmin\src\components\LcM\echarts\analysis_card\index.vue
-->

<template>
  <div class="analysis-wrap" :style="'height:' + cardHeight + 'px;'">
    <div class="title">
      <!-- {{cardData.title}} -->
    </div>
    <div class="container list">
      <div
        class="list-item ellipsis"
        v-for="(item, index) in cardData.listData"
        :title="item.itemTitle + ': ' + item.itemValue"
        :key="index"
      >
        {{ item.itemTitle }}: {{ item.itemValue }}
      </div>
    </div>
    <div class="tips">
      {{ cardData.tips }}
    </div>
  </div>
</template>

<script>
export default {
  props: {
    cardData: {
      type: [Object],
    },
    cardHeight: {
      type: [String],
    },
  },
};
</script>

<style lang="scss" scoped>
.analysis-wrap {
  position: relative;
  border-top: 0.1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  height: 270px;
  box-sizing: border-box;
  .list {
    // padding: 10px;
    .list-item {
      display: inline-block;
      width: 50%;
      // border: 1px solid #ddd;
      padding: 10px 20px;
      box-sizing: border-box;
      font-size: 16px;
    }
  }
  .tips {
    position: absolute;
    bottom: 30px;
    color: #f40;
  }
}

.ellipsis {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
</style>